﻿using System;
using System.Linq;
using System.Linq.Expressions;
using System.Collections.Generic;

namespace SimpleForum.Data.Repositories
{
    public interface IRepository<T> where T : class
    {
        T Get(object Id);
        IQueryable<T> Get();

        T Add(T Entity);

        void Delete(int Id);
        void Delete(T Entity);
        void Delete(IEnumerable<T> Entities);

        T Update(T Entity);

        IEnumerable<T> Where(Expression<Func<T, bool>> Where);

        void SaveChanges();
    }
}